package com.kunya.common.exception;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ServerException extends RuntimeException {

    /**
     * Logger
     */
    private Logger logger=LoggerFactory.getLogger(ServerException.class);

    public ServerException() {
        super();
    }

    public ServerException(String message) {
        super(message);
        logger.error(message);
    }

    public ServerException(String message, Throwable cause) {
        super(message, cause);
        logger.error("Error Message:{},CauseBy:{}",message,cause.toString());
    }

    public ServerException(Throwable cause) {
        super(cause);
        logger.error(cause.toString());
    }

    protected ServerException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
